-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update gnostic to use yaml.v3 #194
Conversation
(requires hand-editing the generated main.go files for extensions, to-fix next)
openapiv3/OpenAPIv3.proto
Outdated
repeated NamedAny specification_extension = 7; | ||
string summary = 8; | ||
string summary = 7; | ||
repeated NamedAny specification_extension = 8; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These need to be swapped back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
type_url: "type.googleapis.com/google.protobuf.StringValue" | ||
value: "\n\00512345" | ||
type_url: "type.googleapis.com/google.protobuf.Int64Value" | ||
value: "\010\271`" | ||
> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test data was updated because the original was incorrect.
@@ -47,7 +47,7 @@ | |||
"id": "x-sampleone-mysimpleboolean" | |||
}, | |||
"PrimitiveInt64": { | |||
"type": "string", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was incorrect.
This is ugly in places but all tests pass and #195 provides a fix for clients that I expect will be broken by this change. |
This set of changes upgrades gnostic's JSON/YAML reading to use gopkg.in/yaml.v3.
In addition to having a cleaner interface, yaml.v3 maintains line and column numbers for all parsed elements, which will allow us to address #31 in a future set of changes.
This first set of commits should be enough for all tests to pass, but there are still many rough edges to be addressed before this is merged.